<!-- Pagination Controls -->
<div class="pagination">
	<span class="page_controls"> 
		{% if resultcount %}
		<span class="page_current page_left">
			Total Records&nbsp;:&nbsp;
			<span class="page_field">{{ resultcount }}</span>
		</span>
		{% endif %}
	
		{% if records.has_previous %} 
			<span class="page_control_on"> 
				<a href="?page=1">first</a>
				<a href="?page={{ records.previous_page_number }}">previous</a> 
			</span>
		{% else %} 
			<span class="page_control_off ui-state-disabled"> 
				<a href="#">first</a>
				<a href="#">previous</a> 
			</span> 
		{% endif %} 
			<span class="page_current">
				Page {{ records.number }} of {{ records.paginator.num_pages }}
			</span> 
		{% if records.has_next %} 
			<span class="page_control_on"> 
				<a href="?page={{ records.next_page_number }}">next</a> 
				<a href="?page={{ records.paginator.num_pages }}">last</a> 
			</span> 
		{% else %} 
			<span class="page_control_off ui-state-disabled">
				 <a href="#">next</a> 
				 <a href="#">last</a>
			</span> 
		{% endif %} 
		{% if resultcount %}
		<!--   --><span class="page_current page_right">
			Page Length&nbsp;:&nbsp;
			<input type="text" id="pagelength" name="pagelength" maxlength="4" value="{{resultsperpage}}" size="4"></input>
		</span> -->
		{% endif %}
		
	</span>
</div>